package cn.rui.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 图片信息
 * @author 徽州大都督
 * @date 2020/8/16
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("image")
public class Image implements Serializable {

    @TableId(type = IdType.AUTO)
    private Integer mid;

    private Integer cid;

    private String descImg;

    private String imgName;

    @TableField(exist = false)
    private String statusStr;

    @TableField(exist = false)
    private String category;

    private String sizeStr; //宽X高

    private String imgUrl; //图片地址

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @TableLogic
    private Integer deleted;

    @TableField(exist = false)
    private ImageCategory imageCategory;

    @TableField(exist = false)
    private Long total;

    private Integer imgStatus;

    @TableField(exist = false)
    private List<ImageCategory> categories;

}
